package com.work.dto.builder;

import java.util.Date;

import com.work.dto.UserDto;
import com.work.model.builder.Builder;

/**
 * The Class UserDtoBuilder.
 *
 * @author "Mihai Roman"
 */
public class UserDtoBuilder extends Builder<UserDto> {

	/**
	 * With ck.
	 *
	 * @param dtoCK the dto ck
	 * @return the user dto builder
	 */
	private UserDtoBuilder withCK(String dtoCK) {
		build().setDtoCK(dtoCK);
		return this;
	}
	
	/**
	 * With created by.
	 *
	 * @param dtoCreatedBy the dto created by
	 * @return the user dto builder
	 */
	private UserDtoBuilder withCreatedBy(int dtoCreatedBy) {
		build().setDtoCreatedBy(dtoCreatedBy);
		return this;
	}
	
	/**
	 * With creation date.
	 *
	 * @param dtoCreationDate the dto creation date
	 * @return the user dto builder
	 */
	private UserDtoBuilder withCreationDate(Date dtoCreationDate) {
		build().setDtoCreationDate(dtoCreationDate);
		return this;
	}
	
	/**
	 * With email.
	 *
	 * @param dtoEmail the dto email
	 * @return the user dto builder
	 */
	private UserDtoBuilder withEmail(String dtoEmail) {
		build().setDtoEmail(dtoEmail);
		return this;
	}
	
	/**
	 * With first name.
	 *
	 * @param dtoFirstName the dto first name
	 * @return the user dto builder
	 */
	private UserDtoBuilder withFirstName(String dtoFirstName) {
		build().setDtoFirstName(dtoFirstName);
		return this;
	}
	
	/**
	 * With last name.
	 *
	 * @param dtoLastName the dto last name
	 * @return the user dto builder
	 */
	private UserDtoBuilder withLastName(String dtoLastName) {
		build().setDtoLastName(dtoLastName);
		return this;
	}
	
	/**
	 * With role.
	 *
	 * @param dtoRole the dto role
	 * @return the user dto builder
	 */
	private UserDtoBuilder withRole(int dtoRole) {
		build().setDtoRole(dtoRole);
		return this;
	}
	
	/**
	 * With updated by.
	 *
	 * @param dtoUpdatedBy the dto updated by
	 * @return the user dto builder
	 */
	private UserDtoBuilder withUpdatedBy(int dtoUpdatedBy) {
		build().setDtoUpdatedBy(dtoUpdatedBy);
		return this;
	}
	
	/**
	 * With updated date.
	 *
	 * @param dtoUpdatedDate the dto updated date
	 * @return the user dto builder
	 */
	private UserDtoBuilder withUpdatedDate(Date dtoUpdatedDate) {
		build().setDtoUpdatedDate(dtoUpdatedDate);
		return this;
	}
	
	/**
	 * An user.
	 *
	 * @param dtoCK the dto ck
	 * @param dtoCreatedBy the dto created by
	 * @param dtoCreationDate the dto creation date
	 * @param dtoEmail the dto email
	 * @param dtoFirstName the dto first name
	 * @param dtoLastName the dto last name
	 * @param dtoRole the dto role
	 * @param dtoUpdatedBy the dto updated by
	 * @param dtoUpdatedDate the dto updated date
	 * @return the user dto
	 */
	public UserDto anUser(String dtoCK, int dtoCreatedBy, Date dtoCreationDate, String dtoEmail, String dtoFirstName, String dtoLastName, int dtoRole, int dtoUpdatedBy, Date dtoUpdatedDate) {
		this.withCK(dtoCK);
		this.withCreatedBy(dtoCreatedBy);
		this.withCreationDate(dtoCreationDate);
		this.withEmail(dtoEmail);
		this.withFirstName(dtoFirstName);
		this.withLastName(dtoLastName);
		this.withRole(dtoRole);
		this.withUpdatedBy(dtoUpdatedBy);
		this.withUpdatedDate(dtoUpdatedDate);
		return this.build();
	}
}
